package com.lei2j.decorator;

/**
 * Created by lei2j on 2019/1/13.
 */
public class Mocha extends CondimentDecorator {

    private Beverage1 beverage;

    public Mocha(Beverage1 beverage) {
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription() + " mocha";
    }

    @Override
    public double cost() {
        return 2.5*beverage.getSize()+beverage.cost();
    }

    @Override
    public int getSize() {
        return beverage.getSize();
    }
}
